<HTML>
<HEAD>
<TITLE>TSP (audio) - InfoAudio</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>InfoAudio</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
InfoAudio [options] AFile1 [AFile2 ... ]
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Print audio file information
</DL>
<H4>Description</H4>
This program prints information about a number of audio files to standard
output.  The full output consists of the file type and name (indented
part of the output below), the file data parameters, and the information
records.
<PRE>
   AU audio file: /usr/local/src/audio/InfoAudio/test/xx.au
     Number of samples : 23808  2001-02-04 14:12:50 UTC
     Sampling frequency: 8000 Hz
     Number of channels: 1 (14/16-bit integer) [FC]
  File name: xx.au
  Header length: 104
  Sampling frequency: 8000
  No. samples: 23808
  No. channels: 1
  Data type: integer16           (A-law8, mu-law8, unsigned8, integer8,
                                  integer16, float32, float64, or text)
  File byte order: big-endian    (big-endian, little-endian, or byte-stream)
  Host byte order: big-endian    (big-endian or little-endian)
  --Information records--
  date: 2001-02-04 14:12:50 UTC
  program: CopyAudio
</PRE>
<P>
For single byte or text data, the "File byte order" field is set to
"byte-stream".
<P>
Non-printing characters (as defined by the routine isprint) in the
information records are replaced by question marks.
<H4>Options</H4>
<DL>
<DT>
Input file(s): AFile1 [AFile2 ... ]:
<DD>
The environment variable AUDIOPATH specifies a list of directories to be
searched for the input audio file(s).
<DT>
-t FTYPE, --type=FTYPE
<DD>
Input audio file type.  In the default automatic mode, the input file
type is determined from the file header.  For input from a non-random
access file (e.g. a pipe), the input file type can be explicitly
specified to avoid the lookahead used to read the file header.  This
option can be specified more than once.  Each invocation applies to the
input files that follow the option.  See the description of the
environment variable AF_FILETYPE below for a list of file types.
<DT>
-P PARMS, --parameters=PARMS
<DD>
Parameters to be used for headerless input files.  This option may be
given more than once.  Each invocation applies to the input files that
follow the option.  See the description of the environment variable
AF_NOHEADER below for the format of the parameter specification.
<DT>
-i ICODE, --info_code=ICODE
<DD>
Parameter to choose the information to be printed.  The information that
can be printed consists of three parts.  The ICODE parameter is the sum
of the codes which control printing of the individual parts.
<PRE>
  1:  Print the file type and name
  2:  Print the file data parameters
  4:  Print the information records
</PRE>
The default is to print all of the information (ICODE=7).  For ICODE=0,
no information is printed, but the program return code indicates if all
files were opened successfully.
<DT>
-h, --help
<DD>
Print a list of options and exit.
<DT>
-v, --version
<DD>
Print the version number and exit.
</DL>
<H4>Environment variables</H4>
<DL>
<DT>
AF_FILETYPE:
</DL>
This environment variable defines the input audio file type.  In the default
mode, the input file type is determined from the file header.
<PRE>
  "auto"       - determine the input file type from the file header
  "AU" or "au" - AU audio file
  "WAVE" or "wave" - WAVE file
  "AIFF" or "aiff" - AIFF or AIFF-C sound file
  "noheader"   - headerless (non-standard or no header) audio file
  "SPHERE"     - NIST SPHERE audio file
  "ESPS"       - ESPS sampled data feature file
  "IRCAM"      - IRCAM soundfile
  "SPPACK"     - SPPACK file
  "INRS"       - INRS-Telecom audio file
  "SPW"        - Comdisco SPW Signal file
  "CSL" or "NSP" - CSL NSP file
  "text"       - Text audio file
</PRE>
<P>
<DL>
<DT>
AF_NOHEADER:
</DL>
This environment variable defines the data format for headerless or
non-standard input audio files.  The string consists of a list of parameters
separated by commas.  The form of the list is
<PRE>
  "Format, Start, Sfreq, Swapb, Nchan, ScaleF"
</PRE>
<DL>
<DT>
Format: File data format
<DD>
<PRE>
 "undefined" - Headerless files will be rejected
 "mu-law8"   - 8-bit mu-law data
 "A-law8"    - 8-bit A-law data
 "unsigned8" - offset-binary 8-bit integer data
 "integer8"  - two's-complement 8-bit integer data
 "integer16" - two's-complement 16-bit integer data
 "integer24" - two's-complement 24-bit integer data
 "integer32" - two's-complement 32-bit integer data
 "float32"   - 32-bit floating-point data
 "float64"   - 64-bit floating-point data
 "text"      - text data
</PRE>
<DT>
Start: byte offset to the start of data (integer value)
<DT>
Sfreq: sampling frequency in Hz (floating point number)
<DT>
Swapb: Data byte swap parameter
<DD>
<PRE>
 "native"        - no byte swapping
 "little-endian" - file data is in little-endian byte order
 "big-endian"    - file data is in big-endian byte order
 "swap"          - swap the data bytes as the data is read
</PRE>
<DT>
Nchan: number of channels
<DD>
The data consists of interleaved samples from Nchan channels
<DT>
ScaleF: Scale factor
<DD>
<PRE>
 "default" - Scale factor chosen appropriate to the type of data.
 "&lt;number or ratio&gt;" - Specify the scale factor to be applied to
    the data from the file.
</PRE>
</DL>
The default values for the audio file parameters correspond to the following
string.
<PRE>
  "undefined, 0, 8000., native, 1, default"
</PRE>
<P>
<DL>
<DT>
AUDIOPATH:
</DL>
This environment variable specifies a list of directories to be searched when
opening the input audio files.  Directories in the list are separated by
colons (semicolons for Windows).
<H4>Author / version</H4>
P. Kabal / v4r0a  2003-11-03
<H4>See Also</H4>
<A HREF="CompAudio.html">CompAudio</A>
<P>
<HR>
Main Index <A HREF="AFsp.html">AFsp</A>
</BODY>
</HTML>
